package com.rc.evcharger.mapper.hlht;


import com.rc.evcharger.common.base.BaseMapper;
import com.rc.evcharger.model.hlht.HlhtTenantOpenPrice;
import com.rc.evcharger.model.hlht.HlhtTenantOpenPriceExample;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface HlhtTenantOpenPriceMapper extends BaseMapper<Long, HlhtTenantOpenPrice, HlhtTenantOpenPriceExample> {

    HlhtTenantOpenPrice selectByPriceIdAndTenantCode(@Param(value = "tenantCode") String tenantCode,
                                                     @Param(value = "priceId") Long priceId,
                                                     @Param(value = "elecStationId") Long elecStationId,
                                                     @Param(value = "hlhtOperatorId") String hlhtOperatorId);

    /**
     * 查询互联互通电价
     * @return
     */
    HlhtTenantOpenPrice selectHlhtValidOpenPrice(@Param(value = "elecStationId") Long elecStationId,
                                                 @Param(value = "tenantCode") String tenantCode,
                                                 @Param(value = "hlhtOperatorId") String hlhtOperatorId);

    /**
     * 查询互联互通电价列表
     * @return
     */
    List<HlhtTenantOpenPrice> listByEsIdAndHlhtInfo(@Param(value = "elecStationId") Long elecStationId,
                                                    @Param(value = "tenantCode") String tenantCode,
                                                    @Param(value = "hlhtOperatorId") String hlhtOperatorId);

    HlhtTenantOpenPrice selectByBeginTime(@Param(value = "elecStationId") Long elecStationId,
                                          @Param(value = "tenantCode") String tenantCode,
                                          @Param(value = "hlhtOperatorId") String hlhtOperatorId,
                                          @Param(value = "beginTime") Date beginTime);
}